<?php if($users != NULL){?>
<div class="row">
	<div class="col-sm-6">
		<section class="panel">
			<header class="bg-success panel-heading font-bold" style="background-color:#6c0a00">Biodata</header>
			<div class="panel-body">
				<form class="form-horizontal" method="get">
					<div class="form-group">
						<label class="col-sm-4 control-label">Nama lengkap</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" data-required="true" value="<?php echo $users[0]['NAMA_LENGKAP']; ?>" disabled>
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-4 control-label">Tempat lahir</label>
					<div class="col-sm-7">
						<input type="text" class="form-control" data-required="true" value="<?php echo $users[0]['TEMPAT_LAHIR']; ?>" disabled>
					</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-4 control-label">Tanggal lahir</label>
						<div class="col-sm-7">
							<input class="datepicker-input form-control" data-required="true" type="text" data-date-format="dd-mm-yyyy" value="<?php $date = explode('-', $users[0]['TGL_LAHIR']); echo $date[2].'-'.$date[1].'-'.$date[0]; ?>" disabled>
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-4 control-label">Jenis kelamin</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" data-required="true" value="<?php if($users[0]['JENIS_KELAMIN'] == 1) echo 'Laki-laki'; else echo 'Perempuan';?>" disabled>
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
						<div class="form-group">
						<label class="col-sm-4 control-label">Alamat</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" data-required="true" value="<?php echo $users[0]['ALAMAT']; ?>" disabled>
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-4 control-label">Nomor telepon</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" data-required="true" value="<?php echo $users[0]['TELP']; ?>" disabled>
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-4 control-label">Nomor handphone</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" data-required="true"value="<?php echo $users[0]['HP']; ?>" disabled>
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-4 control-label">Email</label>
						<div class="col-sm-7">
							<input type="email" class="form-control" data-required="true" value="<?php echo $users[0]['EMAIL']; ?>" disabled>
						</div>
					</div>					
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<div class="col-sm-11 control-label">
							<a class="btn btn-info" target="_blank" href="<?php echo base_url().$users[0]['ALAMAT_KTP'];?>"><i class="fa fa-file text"></i><span class="text"> KTP</span></a>
						</div>
					</div>					
				</form>
			</div>
		</section>
	</div>
	<div class="col-sm-6">
		<section class="panel">
			<header class="bg-success panel-heading font-bold" style="background-color:#6c0a00">Permohonan Legalisir</header>
			<div class="panel-body">
				<form class="form-horizontal" method="get">
					<div class="form-group">
						<label class="col-sm-4 control-label">Tanggal permohonan</label>
						<div class="col-sm-7">
							<input class="form-control" data-required="true" type="text" data-date-format="dd-mm-yyyy" value="<?php echo $users[0]['TGL_PENGAJUAN']; ?>" disabled>
						</div>
					</div>
					<?php if($users[0]['TK1'] != '0') {?>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-4 control-label">Nama SD/PAKET A</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" data-required="true" value="<?php echo $users[0]['TK1']; ?>" disabled>
						</div>
					</div>							
					<div class="form-group">
						<label class="col-sm-4 control-label">Jumlah legalisir</label>
						<div class="col-sm-3">
							<input type="text" class="form-control" data-required="true" value="<?php if ($users[0]['LEMBAR_TK1'] != '0') echo $users[0]['LEMBAR_TK1']; else echo '' ?>" disabled>
						</div>
						<div class="col-sm-4">
							<a class="btn btn-info" target="_blank" href="<?php echo (!empty($users[0]['ALAMAT_TK1']))?base_url().$users[0]['ALAMAT_TK1']:"javascript:peringatan()";?>"><i class="fa fa-file text"></i><span class="text"> Ijazah</span></a>
						</div>							
					</div>
					<?php }?>
					<?php if($users[0]['TK2'] != '0') {?>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-4 control-label">Nama SMP/PAKET B</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" data-required="true" value="<?php echo $users[0]['TK2']; ?>" disabled>
						</div>
					</div>												
					<div class="form-group">
						<label class="col-sm-4 control-label">Jumlah legalisir</label>
						<div class="col-sm-3">
							<input type="text" class="form-control" data-required="true" value="<?php if ($users[0]['LEMBAR_TK2'] != '0') echo $users[0]['LEMBAR_TK2']; else echo '' ?>" disabled>
						</div>
						<div class="col-sm-4">
							<a class="btn btn-info" target="_blank" href="<?php echo (!empty($users[0]['ALAMAT_TK2']))?base_url().$users[0]['ALAMAT_TK2']:"javascript:peringatan()";?>"><i class="fa fa-file text"></i><span class="text"> Ijazah</span></a>
						</div>							
					</div>
					<?php }?>
					
					<?php if($users[0]['TK3'] != '0') :?>	
					<div class="line line-dashed line-lg pull-in"></div>
					
					<div class="form-group">
						<label class="col-sm-4 control-label">Nama SMA/PAKET C</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" data-required="true" value="<?php echo $users[0]['TK3']; ?>" disabled>
						</div>
					</div>			
									
					<div class="form-group">
						<label class="col-sm-4 control-label">Jumlah legalisir</label>
						<div class="col-sm-3">
							<input type="text" class="form-control" data-required="true" value="<?php if ($users[0]['LEMBAR_TK3'] != '0') echo $users[0]['LEMBAR_TK3']; else echo '' ?>" disabled>
						</div> 
						<div class="col-sm-4">
							<a class="btn btn-info" target="_blank" href="<?php echo (!empty($users[0]['ALAMAT_TK3']))?base_url().$users[0]['ALAMAT_TK3']:"javascript:peringatan()";?>"><i class="fa fa-file text"></i><span class="text"> Ijazah</span></a>
						</div>							
					</div>
					<?php endif; ?>
					<div class="line line-dashed line-lg pull-in"></div>				
					<div class="form-group">
						<label class="col-sm-4 control-label">Alasan pengajuan</label>
						<div class="col-sm-7">
							<textarea class="form-control" rows="3" data-minwords="6" data-required="true" disabled><?php echo $users[0]['ALASAN']; ?></textarea>
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-4 control-label">Penanda tangan</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" data-required="true" value="<?php if($users[0]['VERIFIKATOR'] == 2) echo 'SEKRETARIS'; else echo 'KEPALA DINAS';?>" disabled>
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-4 control-label">Status</label>
						<div class="col-sm-7">
							<input type="text" class="form-control" data-required="true" value="<?php if($users[0]['STATUS'] == 1) echo 'BELUM DIPROSES';else if($users[0]['STATUS'] == 2) echo 'SEDANG DIPROSES' ; else echo 'SUDAH DIPROSES';?>" disabled>
						</div>
					</div>
					<div class="form-group">			
						<div class="col-lg-11 control-label">
							<div class="doc-buttons">
								<a href="<?php echo site_url('pengajuan');?>" class="btn btn-sm btn-info"><i class="fa fa-arrow-circle-left text"></i><span class="text"> Kembali</span></a>
							</div>
						</div>				
					</div>						
				</form>
			</div>
		</section>	
	</div>
</div>
<?php }else{ echo $this->load->view("403_page"); }?>

<script>
function peringatan(){
	alert("Belum ada ijazah !");
}
</script>